//
//  UILabel+EXLabel.m
//  IdealerClub
//
//  Created by David on 15/12/26.
//  Copyright © 2015年 IC. All rights reserved.
//

#import "UILabel+EXLabel.h"

@implementation UILabel (EXLabel)

+ (UILabel *)getNormalFrame:(CGRect)frame Text:(NSString *)text
{
    UILabel *label = [[UILabel alloc] initWithFrame:frame];
    label.backgroundColor = RGBCOLOR(0x262630);
    label.font = [UIFont systemFontOfSize:12.f];
    label.textAlignment = NSTextAlignmentCenter;
    label.text = text;
    label.textColor = kBlack6C6C7D;
    label.layer.cornerRadius = frame.size.height/2.f;
    label.layer.masksToBounds = YES;
    return label;
}

+ (UILabel *)getGreenLightFrame:(CGRect)frame Text:(NSString *)text
{
    UILabel *label = [[UILabel alloc] initWithFrame:frame];
    label.backgroundColor = RGBCOLOR(0x1c1c23);
    label.font = [UIFont systemFontOfSize:12.f];
    label.textAlignment = NSTextAlignmentCenter;
    label.text = text;
    label.textColor = kGreenColor;
    label.layer.cornerRadius = frame.size.height/2.f;
    label.layer.masksToBounds = YES;
    return label;
}

- (instancetype)initWithLight2Frame:(CGRect)frame Text:(NSString *)text
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = RGBCOLOR(0x262630);
        self.font = [UIFont systemFontOfSize:12.f];
        self.textAlignment = NSTextAlignmentCenter;
        self.text = text;
        self.textColor = RGBCOLOR(0x48f6c2);
        self.layer.cornerRadius = frame.size.height/2.f;
        self.layer.masksToBounds = YES;
    }
    return self;
}

+ (UILabel *)getBorderWidthFrame:(CGRect)frame Text:(NSString *)text
{
    UILabel *label = [[UILabel alloc] initWithFrame:frame];
    label.backgroundColor = [UIColor clearColor];
    label.font = [UIFont systemFontOfSize:12.f];
    label.textAlignment = NSTextAlignmentCenter;
    label.text = text;
    label.textColor = [UIColor whiteColor];
    label.layer.cornerRadius = frame.size.height/2.f;
    label.layer.masksToBounds = YES;
    label.layer.borderColor = kBlack6C6C7D.CGColor;
    label.layer.borderWidth = 0.5f;
    return label;
}

@end
